package cn.zymall.user.service.impl;

import cn.zymall.common.model.HomeBillboards;
import cn.zymall.common.model.Permissions;
import cn.zymall.user.mapper.PermissionMapper;
import cn.zymall.user.service.PermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 欧泽昌
 * @Description //描述
 * @Date 2020/8/23 10:50
 * @Param
 * @return
 **/
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permissions> implements PermissionService{

	@Autowired
	PermissionMapper permissionMapper;
	/**
	 * @Author 欧泽昌
	 * @Description //查询权限
	 * @Date 2020/8/25 16:00
	 * @Param [bean]
	 * @return boolean
	 **/
	@Override
	public List<Permissions> queryAll() {
		return this.permissionMapper.queryAll();
	}

	/**
	 * @Author 欧泽昌
	 * @Description // 新增权限 返回新增对象id
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	@Override
	public int insertPermissions(Permissions bean) {
		return this.permissionMapper.insertPermissions(bean);
	}

	/**
	 * @Author 欧泽昌
	 * @Description // 批量修改权限状态
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	@Override
	public int batchUpdate(List<Permissions> list) {
		return this.permissionMapper.batchUpdate(list);
	}

	/**
	 * @Author 欧泽昌
	 * @Description //根据名称模糊查询
	 * @Date 2020/8/25 16:03
	 * @Param [name]
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	@Override
	public List<Permissions> queryName(String name) {
		return this.permissionMapper.queryName(name);
	}
}
